<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" 
           uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--引入easyui的样式 -->
<link rel="stylesheet"  type="text/css" href="../themes/default/easyui.css">
<link rel="stylesheet"  type="text/css" href="../themes/icon.css">
<!-- js文件 -->
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../js/easyui-lang-zh_CN.js"></script>
<title>申请住宿信息</title>
</head>

<body>
<script type="text/javascript">

/**
 *审核某个学生的住宿信息
 */
$(function(){
	/* 弹出申请住宿的窗口  */
	$("#modify").click(function(){
		$("#dlg").dialog("open")
	})
	$("#closeapplyinfo").click(function(){
		$('#ff').form('clear');
		$("#dlg").dialog("close");
	})
	/* 点击提交按钮 */
	$("#tijiao").click(function(){
		$('#ff').form({
		    url:"modifydorminfo",
		    onSubmit: function(){
		    	return $(this).form('enableValidation').form('validate');
		    },
		    success:function(data){
		    	if(data){
		    		location.reload();
		    	}else{
		    		alert("提交失败");
		    	}
		    }
		});
		// 提交弹出的这个表单    
		$('#ff').submit();
	})
})


</script>

	<!--查看学生个人住宿的信息(洪英杰)-->
	<table id="checkdorminfo" title="学生住宿信息" class="easyui-datagrid"            
     data-options="url:'checkdorminfo',method:'post'" border="false">
     
        <thead>
            <tr>             	
                <th field="aid" width='80' resizable='false' >申请编号</th>
                <th field="sid" width='80' resizable='false' >学生的学号</th>
                <th field="bfhid" width='80' resizable='false'>原寝室编号</th>     
                <th field="afhid" width='80' resizable='false'>申请寝室编号</th>     
                <th field="astate" width='80' resizable='false' >申请状态</th>     
            </tr>
        </thead>	
        <!--审核按钮-->
	<div id="toolbar">
		<a id="modify" class="easyui-linkbutton" iconCls="icon-edit"
			plain="true">审核</a>
	</div>
	
   	</table>

<div id="dlg" class="easyui-dialog" title="Complex Toolbar on Dialog" style="width:400px;height:200px;padding:10px"
			data-options="
				closed: 'true',
				iconCls: 'icon-save',
				buttons: '#dlg-buttons',
				maximizable: 'true',
				modal:'true'
			">
			<div class="easyui-panel" style="width: 100%;height:100%">
			<div style="padding: 10px 60px 20px 60px">
				<form id="ff" method="post">
					<table cellpadding="5">
						<tr>
							<td>学生的学号:</td>
							<td><input class="easyui-textbox" type="text" name="sid"
								data-options="required:true"></input></td>
						</tr>
						<tr>
							<td>申请状态:</td>
							<td><select class="easyui-combobox" name="astate"><option value="同意">同意</option><option value="不同意">不同意</option></td>
						</tr>
						
					</table>
				</form>
				
			</div>
		    </div>
	</div>
	<!--确定和取消按钮(洪英杰)-->
	<div id="dlg-buttons">
		<a id="tijiao" href="#" class="easyui-linkbutton">提交</a>
		<a id="closeapplyinfo" href="#" class="easyui-linkbutton">取消</a>
	</div>

</body>
</html>






























